#!/bin/sh


#
# Configurations
#

# Add udev rule
sudo cp src/etc/udev/rules.d/80-garbirus.rules /etc/udev/rules.d/80-garbirus.rules
# Add sudo config
sudo cp src/etc/sudoers.d/garbirus /etc/sudoers.d/garbirus
# Add apache config
sudo cp src/etc/apache2/conf.d/garbirus /etc/apache2/conf.d/garbirus

#
# Files
#

# Garbirus script
sudo cp src/usr/bin/garbirus /usr/bin/garbirus
# Garbrowser web browser
sudo cp src/usr/bin/garbrowser /usr/bin/garbrowser
# Web files
sudo cp -fR src/usr/share/garbirus /usr/share/


#
# Permissions
#

# sudo config file
sudo chown root:root /etc/sudoers.d/garbirus
sudo chmod 0440 /etc/sudoers.d/garbirus


#
# Services
#

# Restart udev
sudo service udev restart
# Restart sudo
sudo service sudo restart
# Restart apache
sudo service apache2 restart
